<?php
namespace app\admin\logic;

use think\facade\View;

class MemberLogic
{
    //会员模糊搜索
    public static function getWhereInfo($get)
    {
        $where = [];
        if (isset($get['keywords']) && !empty($get['keywords'])){
            $where[] = ['user_name','like','%'.$get['keywords'].'%'];
        }
        return $where;
    }
    //留值
    public static function getData($get)
    {
        $data = [
            'keywords' =>isset($get['keywords'])?$get['keywords']:'',
        ];
        return $data;
    }
    //添加数据
    public static function addMemberInfo($post)
    {
        $data = [
            'user_name' =>$post['uname'],
            'password'  =>md5($post['pwd2']),
            'email'     =>$post['email'],
            'phone_tel' =>$post['tel'],
        ];
        return $data;
    }



}